/*
 * User: rant
 * Date: Aug 27, 2007
 *
 *
 */
package laMalinche;

/**
 *
 */
public class Adapter<T> {
private T adaptee;

	public Adapter(final T adaptee) {
		this.adaptee = adaptee;
	}

	public T getAdaptee() {
		return adaptee;
	}

	public void setAdaptee(final T adaptee) {
		this.adaptee = adaptee;
	}

	@Override
	public boolean equals(Object o){
		if (o.getClass().equals(adaptee.getClass())){
			return adaptee.equals(o);
		} else {
			return o.equals(getAdaptee());
		}
	}

	@Override
	public int hashCode(){
		return getAdaptee().hashCode();
	}
}